<!-- build:js ../../assets/common/mall.min2.js -->
<script src="../../assets/common/storage-plugin.js"></script>
<script src="../../assets/common/valid-plugin.js"></script>
<script src="../../assets/common/mall-temp-ex.js"></script>
<script src="../../assets/lib/handlebars/handlebars/helpers.js"></script>
<script src="../../assets/lib/pagination/pagination/jquery.pagination.js"></script>
<script src="../../assets/lib/blockUI/blockUI/jquery.blockUI.js"></script>
<script src="../../assets/lib/dialog/dialog/dialog-plus.js"></script>
<script src="../../assets/lib/des.js"></script>
<script src="../../assets/lib/pageOptimize/js/query.js"></script>
<script src="../../assets/lib/pageOptimize/js/paging.js"></script>
<script>
$(document).ready(function(){
	srvMap.add('queryCustomer',' ','front/sh/customer!handler?uid=R004');
	srvMap.add('exit','','front/sh/customer!logOut?uid=R001');
	// 当前用户
	var user_loginId="";
	if(sessionStorage.getItem("userLoginId")!=null)
	{
		$('#user').html(sessionStorage.getItem("userLoginId"));
	}else
	{
		Util.ajax.postJson(srvMap.get('queryCustomer'), {}, function(data, state) {
			if (data.returnCode === '0') {
				var user_loginId=data.bean.userLoginId;
				user_loginId=user_loginId.substring(0,3)+"****"+user_loginId.substring(7,11);
				sessionStorage.setItem("userLoginId",user_loginId);
				$('#user').html(user_loginId);
			}
		});
	}
	
	//增加退出功能
	$('#exit').click(function(){
		Util.ajax.postJson(srvMap.get('exit'), {}, function (data, flag) {
			if (data.returnCode === '0') {
				sessionStorage.removeItem('userLoginId');
				window.location.href='../../login.html';
			}
		})
	});
});
</script>